package com.example.demo.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.bean.Result;
import com.example.demo.dao.UserFriendMapper;
import com.example.demo.entity.UserFriend;
import com.example.demo.exception.SPIPException;
import com.example.demo.intf.UserInterface;

/**
 * @author 88377761
 *
 */
@RestController
public class UserImpl implements UserInterface {

	@Autowired
	UserFriendMapper userFriendMapper;

	@Override
	public Result addFriend(UserFriend userFriend) throws SPIPException {
		userFriend.setOperator();
		userFriendMapper.insertSelective(userFriend);
		return Result.getOk();
	}

}
